#!/usr/bin/env python

## Depth blob detection parameters
# Parameters are listed in the order in which the corresponding
# operations are executed (except for deprecated parameters).

PACKAGE='mrs_bumper'
import roslib;
roslib.load_manifest(PACKAGE)

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator();

params = gen.add_group("Obstacle detection parameters");

# Depthmap obstacle detection params
params_depthmap = params.add_group("Depthmap obstacle detection");
params_depthmap.add("structuring_element_a", int_t, 1, "size of the structuring element major axis", 3, 1, 10);
params_depthmap.add("structuring_element_b", int_t, 1, "size of the structuring element minor axis", 5, 1, 10);
params_depthmap.add("dilate_iterations", int_t, 1, "how many times to dilate the image", 0, 0, 10);
params_depthmap.add("erode_iterations", int_t, 1, "how many times to erode the image", 0, 0, 10);
params_depthmap.add("erode_ignore_empty_iterations", int_t, 1, "how many times to erode the image (without using zeros for the erosion)", 0, 0, 10);
params_depthmap.add("histogram_n_bins", int_t, 1, "number of bins of the depthmap histogram", 1000, 1, 10000);
params_depthmap.add("histogram_quantile_area", int_t, 1, "minimal number of pixels with depth smaller or equal than the resulting obstacle distance", 200, 1, 10000);
params_depthmap.add("max_depth", double_t, 1, "maximal considered detection depth of the depth camera", 10.0, 0.0, 65.535);

# Other params
params_misc = params.add_group("Miscellaneous parameters");
params_misc.add("median_filter_size", int_t, 1, "size of the output median filter", 10, 1, 100);
params_misc.add("update_rate", double_t, 1, "how often data from sensors are evaluated and the bumper topic published", 10.0, 1.0, 100.0);

exit(gen.generate(PACKAGE, "mrs_bumper", "Bumper"))
